package com.qys.livesMall.shop.service;

import com.qys.livesMall.shop.modal.dto.PurchaseAccountUse;
import com.qys.livesMall.shop.modal.entity.H2ShopBase;
import com.qys.livesMall.shop.modal.entity.ShopPurchaseAccount;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 采购额度账户 服务类
 * </p>
 *
 * @author
 * @since 2023-09-15
 */
public interface ShopPurchaseAccountService extends IService<ShopPurchaseAccount> {

    ShopPurchaseAccount getByUserId(Long userId);

    /**
     * 升级更新额度
     * @param shop 升级之后的店铺信息
     * @return
     */
    PurchaseAccountUse upgradeUp(H2ShopBase shop);

    /**
     * 采购扣减
     * @param use
     */
    void purchaseOut(PurchaseAccountUse use);
}
